package com.pda.yuanjing.pages.custombill.scanf;

import com.pda.yuanjing.beanout.JDBeanDNewOut;
import com.pda.yuanjing.beanout.JDBeanNewOut;
import com.pda.yuanjing.beanout.JDBeanOut;
import com.pda.yuanjing.beanout.JDListBeanOut;
import com.pda.yuanjing.beanout.NoBillBeanOut;
import com.pda.yuanjing.thread.CodeBeans;
import com.public_module.basemvp.present.BasePresenter;
import java.util.List;

public class ScanfPresent extends BasePresenter<ScanfModel, ScanfView> implements ScanfModel.CallBack {

    public void initBase(String pid,String jieDianName){
        model.downLoadInfo1(pid,jieDianName);
        model.downLoadInfo2(pid,jieDianName);
        model.downLoadInfo3(pid,jieDianName);
    }

    public void scanfCodeNobill(String  billCode, String processID, String jieDianName, String codes, String selectMsg, String selectMsg1, String sid, String pid, String did, CodeBeans codeBeans,
                                String s1,String s2,String s3){
        model.scanfCodenobill(billCode,  processID,jieDianName,  codes,selectMsg,selectMsg1,sid,pid,did,codeBeans,s1,s2,s3,this);
    }

    public void scanfCode2(String batchID, String  billListID,  String codes,String selectMsg, CodeBeans codeBeans) {
        model.scanfCode2(batchID,  billListID, codes,selectMsg,codeBeans,this);
    }


    @Override
    public void onshowres(String str) {
        if(view!=null)
        {
            view.hideProgress();
            view.showres(str);
        }
    }

    @Override
    public void onshowSuccessres(JDListBeanOut jdListBeanOut) {
        if(view!=null)
        {
            view.hideProgress();
            view.showSuccessres(jdListBeanOut);
        }
    }

    @Override
    public void onshowSuccessresNoBill(NoBillBeanOut.DataBean codeInfoBean) {
        if(view!=null)
        {
            view.hideProgress();
            view.onshowSuccessresNoBill(codeInfoBean);
        }
    }
}


